/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package filecopier.gui;

import org.apache.log4j.Level;
import org.apache.log4j.Logger;

/**
 *
 * @author david
 * 
 * This class is the message that gets sent from the SwingWorker to the Event Dispatch Thread for logging.
 */
public class WorkerMessage {

    private Logger logger = null;
    private Level level = null;
    private String message = null;
    private Exception exception = null;

    public WorkerMessage(final Logger logger, final Level level, final String message) {
        setLogger(logger);
        setLevel(level);
        setMessage(message);
    }

    public WorkerMessage(final Logger logger, final Level level, final String message, final Exception exception) {
        setLogger(logger);
        setLevel(level);
        setMessage(message);
    }

    public void setLogger(final Logger logger) {
        this.logger = logger;
    }

    public void setLevel(final Level level) {
        this.level = level;
    }

    public void setMessage(final String message) {
        this.message = message;
    }

    public void setException(final Exception exception) {
        this.exception = exception;
    }

    public Logger getLogger() {
        return logger;
    }

    public Level getLevel() {
        return level;
    }

    public String getMessage() {
        return message;
    }

    public Exception getException() {
        return exception;
    }
}
